
import React from 'react'
import { connect } from 'dva-no-router'
import { bindActionCreators } from 'redux'

import UI from '../components/examination/examinationDetail';

class App extends React.Component {
    componentWillUnmount(){
        const {getClean}=this.props;
        getClean();
    }
  render() {
    return (
      <UI {...this.props}/>
    )
  }
}

const actions = {
  changeAgree: () => ({type: 'examinationDetail/changeAgree'}),
  submit: () => ({type: 'examinationDetail/submit'}),
  changeOpinion: (val) => ({type: 'examinationDetail/changeOpinion', payload: val}),
    getClean:() =>({type:'examinationDetail/getClean'})
};

const mapProps = ({examinationDetail}) => ({...examinationDetail});

const mapActions = dispatch => ({
  ...bindActionCreators({...actions}, dispatch)
});

export default connect(mapProps, mapActions)(App)